package net.qhzw.geologr5.gis.service.system.controller;

import net.qhzw.geologr5.gis.common.framework.utils.JsonResult;
import net.qhzw.geologr5.gis.service.system.entity.ProjectPoint;
import net.qhzw.geologr5.gis.service.system.service.ProjectPointTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("projectPointType")
public class ProjectPointTypeController {


    @Autowired
    private ProjectPointTypeService projectPointTypeService;


    /***
     * 查询点位类型
     * @return
     */
    @GetMapping("getProjectPointType")
    public JsonResult getProjectPointType() {
        return projectPointTypeService.getProjectPointType();
    }


    /***
     * 新增编辑 点位类型
     * @return
     */
    @PostMapping("edit")
    public JsonResult edit(@RequestBody ProjectPointType projectPoint) {
        return projectPointTypeService.edit(projectPoint);
    }


    /***
     * 删除点位类型
     * @param ids
     * @return
     */
    @DeleteMapping("delete/{id}")
    public JsonResult delete(@PathVariable("id") Integer id) {
        return projectPointTypeService.delete(id);
    }

}
